import '../item_style.dart';
import '../tooltip.dart';
import 'series.dart';

import 'package:json_annotation/json_annotation.dart';

part 'pictorial_bar_series.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class PictorialBarEmphasis {
  var focus;
  var blurScope;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  PictorialBarEmphasis(
      {this.focus, this.blurScope, this.itemStyle, this.labelLine, this.label});

  factory PictorialBarEmphasis.fromJson(Map<String, dynamic> json) =>
      _$PictorialBarEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$PictorialBarEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class PictorialBarBlurSelectEmphasis {
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  PictorialBarBlurSelectEmphasis({this.itemStyle, this.label, this.labelLine});

  factory PictorialBarBlurSelectEmphasis.fromJson(Map<String, dynamic> json) =>
      _$PictorialBarBlurSelectEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$PictorialBarBlurSelectEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class PictorialBarData {
  var name;
  var value;
  var symbol;
  var symbolSize;
  var symbolPosition;
  var symbolOffset;
  var symbolRotate;
  var symbolRepeat;
  var symbolRepeatDirection;
  var symbolMargin;
  var symbolClip;
  var symbolBoundingData;
  var symbolPatternSize;
  var z;
  var hoverAnimation;
  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing;
  var animationDurationUpdate;
  var animationEasingUpdate;
  var animationDelay;
  var animationDelayUpdate;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;
  PictorialBarBlurSelectEmphasis? emphasis;
  PictorialBarBlurSelectEmphasis? blur;
  PictorialBarBlurSelectEmphasis? select;
  Tooltip? tooltip;

  PictorialBarData(
      {this.name,
      this.value,
      this.symbol,
      this.symbolSize,
      this.symbolPosition,
      this.symbolOffset,
      this.symbolRotate,
      this.symbolRepeat,
      this.symbolRepeatDirection,
      this.symbolMargin,
      this.symbolClip,
      this.symbolBoundingData,
      this.symbolPatternSize,
      this.z,
      this.hoverAnimation,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.animationDelay,
      this.animationDelayUpdate,
      this.label,
      this.labelLine,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.tooltip});

  factory PictorialBarData.fromJson(Map<String, dynamic> json) =>
      _$PictorialBarDataFromJson(json);

  Map<String, dynamic> toJson() => _$PictorialBarDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class PictorialBarSeries extends Series {
  var type = 'pictorialBar';
  var id;

  var name;
  var legendHoverLink;
  var coordinateSystem;
  var xAxisIndex;
  var yAxisIndex;
  var cursor;

  SeriesLabel? label;
  LabelLine? labelLine;
  LabelLayout? labelLayout;
  ItemStyle? itemStyle;
  PictorialBarEmphasis? emphasis;
  PictorialBarBlurSelectEmphasis? blur;

  var select;

  var selectedMode;
  var barWidth;
  var barMaxWidth;
  var barMinWidth;
  var barMinHeight;
  var barMinAngle;
  var barGap;
  var barCategoryGap;
  var symbol;
  var symbolSize;
  var symbolPosition;
  var symbolOffset;
  var symbolRotate;
  var symbolRepeat;
  var symbolRepeatDirection;
  var symbolMargin;
  var symbolClip;
  var symbolBoundingData;
  var symbolPatternSize;
  var hoverAnimation;
  var dimensions;
  var encode;

  List<PictorialBarData>? data;
  MarkPoint? markPoint;
  MarkLine? markLine;
  MarkArea? markArea;

  var zlevel;
  var z;
  var silent;
  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing;
  var animationDurationUpdate;
  var animationEasingUpdate;
  Tooltip? tooltip;

  PictorialBarSeries(
      {this.id,
      this.name,
      this.legendHoverLink,
      this.coordinateSystem,
      this.xAxisIndex,
      this.yAxisIndex,
      this.cursor,
      this.label,
      this.labelLine,
      this.labelLayout,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.selectedMode,
      this.barWidth,
      this.barMaxWidth,
      this.barMinWidth,
      this.barMinHeight,
      this.barMinAngle,
      this.barGap,
      this.barCategoryGap,
      this.symbol,
      this.symbolSize,
      this.symbolPosition,
      this.symbolOffset,
      this.symbolRotate,
      this.symbolRepeat,
      this.symbolRepeatDirection,
      this.symbolMargin,
      this.symbolClip,
      this.symbolBoundingData,
      this.symbolPatternSize,
      this.hoverAnimation,
      this.dimensions,
      this.encode,
      this.data,
      this.markPoint,
      this.markLine,
      this.markArea,
      this.zlevel,
      this.z,
      this.silent,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.tooltip});

  factory PictorialBarSeries.fromJson(Map<String, dynamic> json) =>
      _$PictorialBarSeriesFromJson(json);

  Map<String, dynamic> toJson() => _$PictorialBarSeriesToJson(this);
}
